<template>
   <div class="scroll-wrapper">
  <van-list
      v-model="loading"
      :finished="finished"
      loading-text="一大波数据正在赶过来"
      finished-text="没了"
      @load="onLoad"
    >
      <van-cell v-for="item in list" :key="item" :title="item" />
    </van-list>
   </div>
</template>
<script>
import { getArticles } from '@/api/articles.js'
export default {
  name: 'Arctile',
  props: {
    channel: {
      type: Object,
      required: true
    }
  },
  data () {
    return {
      list: [],
      finished: false,
      loading: false,
      timestamp: null
    }
  },
  computed: {
  },
  created () {
  },
  methods: {
    async onLoad () {
      try {
        const res = await getArticles(this.channel.id, this.timestamp)
        console.log(res)
        const arr = res.data.data.results
        console.log(arr)
      } catch (err) {
        console.log(err)
      }
    }
  }
}
</script>
<style scoped lang='less'>
.meta {
  display: flex;
  span{
    margin-right: 10px;
  }
  .close {
    margin-left: auto;
  }
}
</style>
